Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't loop on hidden recursive data type #1925

Merged
merged 1 commit into from
Sep 13, 2021
Merged

Don't loop on hidden recursive data type #1925

merged 1 commit into from
Sep 13, 2021

Conversation

christiaanb
Copy link
Member

The recursive occurrence was hiding behind a type family. So we should always expand type families when checking whether a
data type is recursive.

Fixes #1921

  • Write a changelog entry (see changelog/README.md)
  • Check copyright notices are up to date in edited files

-- Straightforward newtype
type LFSRState :: Nat -> Type
newtype LFSRState n = LFSRState { runLFSRState :: BitVector n }
deriving (NFDataX, AutoReg) via (BitVector n)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should remove DerivingVia and backport this to 1.4 in case there's another 1.4.x release

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I removed it as part of getting it through CI

The recursive occurrence  was hiding behind a type family. So we
should always expand type families when checking whether a
data type is recursive.

Fixes #1921
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Problem recursing on singleton lists
2 participants